import {createRouter, createWebHashHistory} from 'vue-router'


const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login/login')
  },
  {
    path: '/:path(.*)*',
    component: () => import('@/views/error/404'),
    hidden: true
  },
  //layout
  {
    path: '/',
    redirect: 'index',
    name:"layout",
    component: () => import('../views/layout/layout'),
    children: [
      {
        path: '/index',
        component: () => import('@/views/home/home'),
        name: 'index',
        meta: {title: '首页'}
      },
      /*{
         path: '/basicData/product/brand',
         component: () => import('@/views/brand/brand'),
         name: 'brand',
         meta: {title: '商品品牌'}
       },
       {
          path: '/basicData/product/product',
          component: () => import('@/views/brand/product'),
          name: 'product',
          meta: {title: '商品信息'}
        },
        {
          path: '/basicData/product/productLine',
          component: () => import('@/views/brand/productLine'),
          name: 'productLine',
          meta: {title: '商品线'}
        },
        {
          path: '/purchase/customer',
          component: () => import('@/views/companion/customer/customer'),
          name: 'customer',
          meta: {title: '客户'}
        },
        {
          path: '/purchase/customerDetails',
          component: () => import('@/views/companion/customer/customerDetails'),
          name: 'customerDetails',
          meta: {title: '客户详情'}
        },
        {
          path: '/purchase/supplier',
          component: () => import('@/views/companion/supplier/supplier'),
          name: 'supplier',
          meta: {title: '供应商'}
        },
        {
          path: '/purchase/supplierDetails',
          component: () => import('@/views/companion/supplier/supplierDetails'),
          name: 'supplierDetails',
          meta: {title: '供应商详情'}
        }*/
    ]
  },


]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})


export default router
